<?php


namespace App\Rpc\api\impl;

use App\Common\Res;
use App\Request\client\WeworkFriendRequest;
use App\Rpc\api\WeworkFriendInterface;
use App\Service\api\WeworkFriendService;
use Hyperf\Utils\ApplicationContext;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;


class WeworkFriendImpl implements WeworkFriendInterface
{
    /**
     * 获取用户信息
     * @param array $params
     * @return array
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     */
    public function getFriendsInfo(array $params): array
    {
        ApplicationContext::getContainer()->get(WeworkFriendRequest::class)->validated($params, __FUNCTION__);
        return ApplicationContext::getContainer()->get(WeworkFriendService::class)->getFriendsInfo($params);
    }

}